package br.leiam.eolica.BD;

import java.sql.SQLException;

import org.jfree.data.jdbc.JDBCXYDataset;

import br.leiam.eolica.excecoes.EolicaException;

public class ConsultaJfreeReady extends Consulta {

	private JDBCXYDataset chartDataset;

	public ConsultaJfreeReady(String queryString) throws EolicaException {
		super(queryString);
		synchronized (this) {
			try {
				chartDataset = new JDBCXYDataset(super.conexao, queryString);
			} catch (SQLException e) {
				throw new EolicaException(e.getMessage());
			}
		}

	}

	public void setChartDataset(JDBCXYDataset chartDataset) {
		this.chartDataset = chartDataset;
	}

	public JDBCXYDataset getChartDataset() {
		return chartDataset;
	}

}
